﻿@inject IWorkContext workContext
@inject LocalizationSettings localizationSettings
@inject CommonSettings commonSettings
@inject IEventPublisher eventPublisher
@using Nop.Web.Framework.UI;
@using Nop.Core;
@using Nop.Core.Domain.Localization
@{
    var kendoVersion = "2014.1.318";
    var supportRtl = workContext.WorkingLanguage.Rtl && !localizationSettings.IgnoreRtlPropertyForAdminArea;

    //CSS resources
    if (supportRtl)
    {
        Html.AppendCssFileParts("~/css/admin/styles.rtl.css");
        Html.AppendCssFileParts("~/lib/adminLTE/AdminLTE-2.3.0.rtl.css");
        Html.AppendCssFileParts("~/lib/bootstrap/css/bootstrap.rtl.css");
    }
    else
    {
        Html.AppendCssFileParts("~/css/admin/styles.css");
        Html.AppendCssFileParts("~/lib/adminLTE/AdminLTE-2.3.0.min.css");
        Html.AppendCssFileParts("~/lib/bootstrap/css/bootstrap.min.css");
    }
    Html.AppendCssFileParts($"~/lib/kendo/{kendoVersion}/kendo.rtl.min.css");
    Html.AppendCssFileParts($"~/lib/kendo/{kendoVersion}/kendo.default.min.css");
    Html.AppendCssFileParts($"~/lib/kendo/{kendoVersion}/kendo.common.min.css");
    Html.AppendCssFileParts("~/lib/jquery-ui-themes/smoothness/jquery-ui-1.10.3.custom.min.css");
    Html.AppendCssFileParts("~/lib/fontAwesome/css/font-awesome-4.6.3.min.css");
    Html.AppendCssFileParts("~/lib/bootstrap-touchspin/jquery.bootstrap-touchspin.min.css");
    <!-- AdminLTE Skins (choose a skin from the css/skins) -->
    Html.AppendCssFileParts("~/lib/adminLTE/skins/_all-skins.min.css");

    //scripts
    Html.AppendScriptParts($"~/lib/kendo/{kendoVersion}/kendo.web.min.js");
    Html.AppendScriptParts("~/js/admin.common.js");
    Html.AppendScriptParts("~/lib/jquery-migrate-1.2.1.min.js");
    Html.AppendScriptParts("~/lib/jquery-ui-1.10.3.custom.min.js");
    Html.AppendScriptParts("~/lib/jquery.validate.unobtrusive.min.js");
    Html.AppendScriptParts("~/lib/jquery.validate.min.js");
    Html.AppendScriptParts("~/lib/adminLTE/app.min.js");
    Html.AppendScriptParts("~/lib/bootstrap/bootstrap.min.js");
    Html.AppendScriptParts("~/lib/bootstrap-touchspin/jquery.bootstrap-touchspin.min.js");
    Html.AppendScriptParts("~/lib/jquery-1.10.2.min.js");

    //page title
    string adminPageTitle = !string.IsNullOrWhiteSpace(ViewBag.Title) ? ViewBag.Title + " / " : "";
    adminPageTitle += T("Admin.PageTitle").Text;

    //X-UA-Compatible tag
    if (commonSettings.RenderXuaCompatible)
    {
        Html.AppendHeadCustomParts($"<meta http-equiv=\"X-UA-Compatible\" content=\"{commonSettings.XuaCompatibleValue}\"/>");
    }

    //event
    eventPublisher.Publish(new PageRenderingEvent(this.Html));
}
<!DOCTYPE html>
<html@(supportRtl ? Html.Raw(" dir=\"rtl\"") : null)>
    <head>
        <title>@adminPageTitle</title>
        <meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
        @Html.NopHeadCustom()
        @Html.NopCssFiles(this.Url, ResourceLocation.Head, false)
        @Html.NopScripts(this.Url, ResourceLocation.Head, false)
    </head>
    <body class="hold-transition skin-blue sidebar-collapse">
        <div class="wrapper">
            <div class="content-wrapper">
                @await Html.PartialAsync("~/Areas/Admin/Views/Shared/Notifications.cshtml")
                @RenderBody()
            </div>
        </div>
        @Html.NopCssFiles(this.Url, ResourceLocation.Footer)
        @Html.NopScripts(this.Url, ResourceLocation.Footer)
    </body>
    </html>
